package domain;

import java.util.List;


public class Customer {

	private int id;

	private String logon;

	private String name;

	private String email;

	private String password;

	private Address address;

	private String category;

	private Shipping shipping;

	private Billing billing;

	private List<CartItem> cart;
	
	public Customer(String logon, String password) {
		super();
		this.logon = logon;
		this.password = password;
		this.category = Category.NewToGroup.toString();
	}

	public Customer(int id, String logon, String name, String email,
			String password, Address address, String category,
			Shipping shipping, Billing billing, List<CartItem> cart) {
		super();
		this.id = id;
		this.logon = logon;
		this.name = name;
		this.email = email;
		this.password = password;
		this.address = address;
		this.category = category;
		this.shipping = shipping;
		this.billing = billing;
		this.cart = cart;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getLogon() {
		return logon;
	}

	public void setLogon(String logon) {
		this.logon = logon;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public Shipping getShipping() {
		return shipping;
	}

	public void setShipping(Shipping shipping) {
		this.shipping = shipping;
	}

	public Billing getBilling() {
		return billing;
	}

	public void setBilling(Billing billing) {
		this.billing = billing;
	}

	public List<CartItem> getCart() {
		return cart;
	}

	public void setCart(List<CartItem> cart) {
		this.cart = cart;
	}
	
	public boolean addCartItem(CartItem item) {
		return this.cart.add(item);
	}
	
	public boolean removeCartItem(CartItem item) {
		return this.cart.remove(item);
	}
}
